<script>
async function register(script, scope) {
  const registration = await navigator.serviceWorker.register(
      script, {scope: scope})
  await new Promise(resolve =>
    registration.installing.addEventListener('statechange', resolve));
}
async function initialize() {
  await register('service-worker.js?generated', './sw-scope-generated/');
  await register('service-worker.js?navigation-preload',
                 './sw-scope-navigation-preload/');
  await register('service-worker.js?no-respond-with',
                 './sw-scope-no-respond-with/');
  document.title = "Done";
}
initialize();
</script>
